import { defineConfig } from 'rollup'
import { nodeResolve } from '@rollup/plugin-node-resolve' //处理node模块导入
import commonjs from '@rollup/plugin-commonjs' //处理commonjs模块化导入
import typescript from '@rollup/plugin-typescript' //处理ts文件导入
import json from '@rollup/plugin-json' //处理json文件导入

export default defineConfig({
  input: './src/index.ts',
  output: {
    file: './dist/index.js',
    format: 'esm',
    name: 'csscli'
  },
  plugins: [
    nodeResolve({ extensions: ['.js', '.ts'] }),
    commonjs(),
    typescript({
      // exclude:'',
      // include: 'src/**',
      tsconfig: './tsconfig.json'
    }),
    json()
  ]
})
